package entites;

import java.io.Serializable;
import java.util.Date;

public class Document implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int idDoc;
	private String cheminAcces;
	private int idCours;
	private String nom;
	private Date dateAjout;
	private Date dateDerModif;
	private boolean visible;
	private int taille;
	private byte[] contenu;

	public Document(int idDoc, String cheminAcces, int idCours, String nom,
			Date dateAjout, Date dateDerModif, boolean visible) {
		super();
		this.idDoc = idDoc;
		this.cheminAcces = cheminAcces;
		this.idCours = idCours;
		this.nom = nom;
		this.dateAjout = dateAjout;
		this.dateDerModif = dateDerModif;
		this.visible = visible;
	}

	public int getIdDoc() {
		return idDoc;
	}

	public void setIdDoc(int idDoc) {
		this.idDoc = idDoc;
	}

	public String getCheminAcces() {
		return cheminAcces;
	}

	public void setCheminAcces(String cheminAcces) {
		this.cheminAcces = cheminAcces;
	}

	public int getIdCours() {
		return idCours;
	}

	public void setIdCours(int idCours) {
		this.idCours = idCours;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public Date getDateAjout() {
		return dateAjout;
	}

	public void setDateAjout(Date dateAjout) {
		this.dateAjout = dateAjout;
	}

	public Date getDateDerModif() {
		return dateDerModif;
	}

	public void setDateDerModif(Date dateDerModif) {
		this.dateDerModif = dateDerModif;
	}

	public boolean isVisible() {
		return visible;
	}

	public void setVisible(boolean visible) {
		this.visible = visible;
	}

	public byte[] getContenu() {
		return contenu;
	}

	public void setContenu(byte[] contenu) {
		this.contenu = new byte[taille];
		this.contenu = contenu;
	}

	public int getTaille() {
		return taille;
	}

	public void setTaille(int taille) {
		this.taille = taille;
	}

}
